package org.xg.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.xg.dao.Role2AuthorityDao;
import org.xg.dao.RoleDao;
import org.xg.dao.User2RoleDao;
import org.xg.domain.RoleVO;

@Service
@Transactional
public class RoleBS {
	@Resource
	private RoleDao roleDao ;
	
	@Resource
	private Role2AuthorityDao role2authDao ;
	
	@Resource
	private User2RoleDao user2roleDao;
	
	/**
	 * 查找用户对应的角色
	 * @param username
	 * @return
	 */
	public List<RoleVO> findRolesByUsername(String username){
		return user2roleDao.findRolesByUsername(username);
	}
}
